package com.whj.ems.service.impl;

import java.util.List;

import com.whj.ems.dao.BaseDao;
import com.whj.ems.service.BaseService;


public class BaseServiceImpl<T> implements BaseService<T>{

	private BaseDao<T> baseDao;
	
	public BaseDao<T> getBaseDao() {
		return baseDao;
	}

	public void setBaseDao(BaseDao<T> baseDao) {
		this.baseDao = baseDao;
	}

	public void delete(T entity) throws Exception {
		this.baseDao.delete(entity);
	}

	public List<T> get() throws Exception {
		return this.baseDao.get();
	}

	public void save(T entity) throws Exception {
		this.baseDao.save(entity);
	}

	public void update(T entity) throws Exception {
		this.baseDao.update(entity);
	}

	@Override
	public void deleteByIds(List<T> entities) throws Exception {
		this.baseDao.deleteByIds(entities);
	}

	@Override
	public int getCount(Class<T> class1) throws Exception {
		return this.baseDao.getCount(class1);
	}


}
